home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8736 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.lang.c++
  2. Path: presby.edu!jtbell
  3. From: jtbell@presby.edu (Jon Bell)
  4. Subject: Re: How can I include IOSTREAM.H only once?
  5. Message-ID: <DnDuD8.B9p@presby.edu>
  6. Date: Mon, 26 Feb 1996 12:22:20 GMT
  7. References: <4gre90$oei@service.polymtl.ca>
  8. Organization: Presbyterian College, Clinton, South Carolina USA
  9.  
  10. [posted and e-mailed]
  11.  
  12.  Michael Gaudette <bluefox@info.polymtl.ca> wrote:
  13. >I am presently engaged in what is usually called "the learning process", 
  14. >and I've been programming simple programs with classes.  Because of this, 
  15. >I have had to #include <iostream.h> in most of my "class.cpp" files AND 
  16. >in my main program. This (added to conio.h and all the other standard 
  17. >libraries) usually result in a simple program being 20000 lines long.
  18. >Is there any way (using Borland v4.5) to make the compiler only link 
  19. >those files ONCE?
  20.  
  21. Don't worry about it.  Header files do not (usually) produce any object
  22. code by themselves.  They simply provide information to the compiler that
  23. allows it to verify that you are using the library functions and classes
  24. properly.  The actual code resides in the libraries, which are linked only
  25. once. 
  26.  
  27. -- 
  28. Jon Bell <jtbell@presby.edu>            |  "The Internet grows hyper-
  29. Dept. of Physics and Computer Science   |  bolically, but is usually 
  30. Presbyterian College                    |  described elliptically."
  31. Clinton, South Carolina USA             |       -- Dr. Internet
  32.